﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace SMSSnew.UI.vicePrincipal.timetable.dataEntry
{
    public partial class vicePrinDataEntry : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void AddBtn_Click(object sender, EventArgs e)
        {
            String option = cboDEntry.SelectedItem.ToString();

            if (option == "Subject Details")
            {
                Response.Redirect("vicePrinAddSubjectDetails.aspx");
            }
            else if (option == "Teacher Allocation Details")
            {
                Response.Redirect("vicePrinTeacherAllocation.aspx");
            }
            else
            {
                Response.Redirect("vicePrinClassCombinationDetails.aspx");
            }

        }

        protected void EditBtn_Click(object sender, EventArgs e)
        {
            String option = cboDEntry.SelectedItem.ToString();

            if (option == "Subject Details")
            {
                Response.Redirect("vicePrinEditSubjectDetails1.aspx");
            }
            else if (option == "Teacher Allocation Details")
            {
                Response.Redirect("vicePrinEditSubjectDetails1.aspx");
            }
            else
            {
                Response.Redirect("vicePrinTeacherAllocationEdit.aspx");
            }

        }

        protected void DeleteBtn_Click(object sender, EventArgs e)
        {
            String option = cboDEntry.SelectedItem.ToString();

            if (option == "Subject Details")
            {
                Response.Redirect("vicePrinDeleteSubject.aspx");
            }
            else if (option == "Teacher Allocation Details")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "alert('You are unable to delete Teacher Allocation Details');", true);
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "alert('You are unable to delete Class Combination Details');", true);
            }
        }
    }
}
